

#ifndef __STM32_FLASH_H__
#define __STM32_FLASH_H__

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

int stm32flash_get_sector(uint32_t addr);
int stm32flash_check_align(uint32_t addr);
int stm32flash_erase(uint32_t addr, uint32_t length);
int stm32flash_write(uint32_t addr, const uint8_t* data, uint32_t len);

#ifdef __cplusplus
}
#endif

#endif // __STM32_FLASH_H__
